<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>回复功能测试</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        .message {
            border: 1px solid #ddd;
            margin: 10px 0;
            padding: 15px;
            border-radius: 8px;
        }
        .reply {
            margin-left: 30px;
            border-left: 3px solid #1890ff;
            padding-left: 15px;
            margin-top: 10px;
        }
        .debug {
            background: #f0f0f0;
            padding: 10px;
            margin: 10px 0;
            border-radius: 4px;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <h1>回复功能测试</h1>
    
    <div class="debug">
        <h3>测试数据</h3>
        <p>留言ID: 1939962459161141249</p>
        <p>回复ID: 1939962541155590146</p>
        <p>回复内容: ok</p>
        <p>状态: 1 (已发布)</p>
    </div>

    <div class="message">
        <h3>测试留言</h3>
        <p>这是一条测试留言，用于验证回复功能是否正常工作。</p>
        <div class="reply">
            <h4>回复</h4>
            <p>ok</p>
            <small>匿名用户 - 2025-07-01 16:21:27</small>
        </div>
    </div>

    <div class="debug">
        <h3>可能的问题</h3>
        <ul>
            <li>后端查询条件是否正确</li>
            <li>数据类型是否匹配</li>
            <li>前端显示逻辑是否正确</li>
            <li>API响应格式是否正确</li>
        </ul>
    </div>

    <script>
        // 模拟API调用
        console.log('测试回复功能...');
        
        // 模拟留言数据
        const testMessage = {
            id: '1939962459161141249',
            nickname: '测试用户',
            content: '这是一条测试留言',
            replies: [
                {
                    id: '1939962541155590146',
                    nickname: '匿名用户',
                    content: 'ok',
                    createTime: '2025-07-01 16:21:27'
                }
            ]
        };
        
        console.log('测试数据:', testMessage);
        console.log('回复数量:', testMessage.replies.length);
    </script>
</body>
</html> 